<?php
/**
 * 辅导学生荣誉模型
 * @author LXf
 * @date 2018.8.24
 */

namespace App\Model\Crm;

use App\model\BaseModel;
use DB;

class MyTrainHonorModel extends BaseModel{
     /***
     *辅导学生荣誉列表 
     ***/
    const MY_TRAIN_HONOR = 'my_train_honor';
    public static function listTrainHonor($orderby="id"){
        
        return DB::table(self::MY_TRAIN_HONOR)->orderBy($orderby)->get();

    }
    /***
     *添加辅导学生荣誉
     ***/
    public static function addTrainHonor($data){
        
        return DB::table(self::MY_TRAIN_HONOR)->insert($data);

    }
     /***
     *修改辅导学生荣誉
     ***/
    public static function updateTrainHonor($where,$data){
        
        return DB::table(self::MY_TRAIN_HONOR)->where($where)->update($data);

    }
    public static function delTrainHonor($where){
       return DB::table(self::MY_TRAIN_HONOR)->where($where)->delete();
    }

}